<p>This rule raises an issue when anonymous functions, arrow functions, or classes are used as default exports.</p>
<h2>Why is this an issue?</h2>
<p>When you export anonymous functions or classes as default exports, it becomes difficult to search for and identify these components throughout your
codebase.</p>
<p>Default exports are imported with whatever name the importing module chooses. However, when the exported item itself is anonymous, there’s no
consistent identifier to search for. This makes code navigation, refactoring, and debugging more challenging.</p>
<p>For example, if you export an anonymous class, different files might import it with different names like <code>Component</code>,
<code>MyComponent</code>, or <code>Widget</code>. Without a consistent name at the export site, finding all usages or understanding the component’s
purpose becomes much harder.</p>
<p>Named exports create a clear contract between modules. They establish a canonical name that can be used consistently across the codebase, improving
code searchability and making the developer experience smoother.</p>
<h3>What is the potential impact?</h3>
<p>This issue impacts code maintainability and developer productivity. It makes codebase navigation more difficult, slows down refactoring efforts,
and can lead to inconsistent naming across different parts of the application. While it doesn’t affect runtime behavior, it significantly impacts the
development experience.</p>
<h3>How to fix?</h3>
<p>Add a name directly to the function or class being exported. This creates a clear identifier that can be consistently referenced.</p>
<h4>Non-compliant code example</h4>
<pre data-diff-id="1" data-diff-type="noncompliant">
export default function () {
  return 'Hello World';
} // Noncompliant
</pre>
<h4>Compliant code example</h4>
<pre data-diff-id="1" data-diff-type="compliant">
export default function greet() {
  return 'Hello World';
}
</pre>
<h3>Documentation</h3>
<ul>
  <li> <a href="https://github.com/sindresorhus/eslint-plugin-unicorn#readme">eslint-plugin-unicorn</a> - Rule <a
  href="https://github.com/sindresorhus/eslint-plugin-unicorn/blob/HEAD/docs/rules/no-anonymous-default-export.md">no-anonymous-default-export</a>
  </li>
  <li> MDN - export - <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/export">Documentation on JavaScript export
  statements and default exports</a> </li>
  <li> MDN - import - <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import">Documentation on JavaScript import
  statements and how default imports work</a> </li>
</ul>
